package Chapter3;

import java.util.Scanner;

//58页程序 3.1 已更改

class SwitchTest {
    public static void main(String[] args) {
        System.out.println("请输入一个字符：");

        Scanner scan = new Scanner(System.in);
        String message = scan.nextLine();

        switch (message){
            case"0": case"1": case"2": case"3": case"4": case"5": case"6": case"7": case"8": case"9":
                System.out.println("字符是数字"+message);
                break;
            case"a": case"b": case"c": case"d": case"e": case"f": case"g": case"h": case"i": case"j":
                System.out.println("字符是小写字母"+message);
                break;
            case"A": case"B": case"C": case"D": case"E": case"F": case"G": case"H": case"I": case"J":
                System.out.println("字符是大写字母"+message);
                break;
            default:
                System.out.println("字符数量过多或该字符未包含"+message);
        }
    }
}